<template>
  <div>
    <h1>filter 过滤器</h1>
    <p>全局过滤器</p>
    <span>{{str | reverse}}</span>

    <h2>局部过滤器</h2>
    <span>{{info | toUpCase}}</span>
  </div>
</template>

<script>
export default {
  data () {
    return {
      str: 'pink',
      info: 'bcnm'
    }
  },
  filters: {
    toUpCase (val) {
      return val.toUpperCase()
    }
  }
}
</script>

<style>
</style>